﻿namespace SmallGeo;
/// <summary>
/// 点和面关系
/// </summary>
public enum EnumPointWithPolygon
{
    /// <summary>
    /// 点在多边形的角上, 如下: 点 P 在多边形左上角
    /// <code>
    /// P-------x
    /// |       |
    /// |       |
    /// x-------x
    /// </code>
    /// </summary>
    IsOnCorner = 1,
    /// <summary>
    /// 点在多边形边上, 如下: 点 P 在多边形上边上
    /// <code>
    /// x------P----x
    /// |           |
    /// |           |
    /// x-----------x
    /// </code>
    /// </summary>
    IsOnEdge = 2,
    /// <summary>
    /// 点在多边形内部, 如下:
    /// <code>
    /// x-----------x
    /// |           |     
    /// |   P       |
    /// |           |
    /// x-----------x
    /// </code>
    /// </summary>
    IsInside = 3,
    /// <summary>
    /// 点在多边形外, 如下:
    /// <code>
    /// x-----------x
    /// |           |     
    /// |           |   P
    /// |           |
    /// x-----------x
    /// </code>
    /// </summary>
    IsOutside = 4,
}

/// <summary>
/// 点和线段的关系
/// </summary>
[Flags]
public enum EnumPointWithLineSegment
{
    /// <summary>
    /// 点在线段的端点上, 如下:
    /// <code>
    ///  P-----------x
    /// </code>
    /// </summary>
    IsOnCorner = 1,
    /// <summary>
    /// 点在线段上(非端点上), 如下:
    /// <code>
    /// x---P----x
    /// </code>
    /// </summary>
    IsOnEdge = 2,
    /// <summary>
    /// 点在线段的延长线上, 如下:
    /// <code>
    ///     P   x---------------x
    /// </code>
    /// </summary>
    IsOnExtensionLine = 3,
    /// <summary>
    /// 点在线段外, 也不在线段的延长线上, 如下:
    /// <code>
    ///     P
    /// 
    /// x-------------x
    /// </code>
    /// </summary>
    IsOut = 4,
}
